<template >
  <el-card >
<!--  <el-tabs type="border-card" v-model="activeName" style="height:800px;" class="table-container">-->
<!--    <el-tab-pane label="待发货" name="first">-->
<!--      <div class="table-container">-->
<!--        <el-table-->
<!--          ref="productTable"-->
<!--          :data="notSendList"-->
<!--          style="width: 100%"-->
<!--          v-loading="listLoading"-->
<!--          highlight-current-row-->
<!--          border-->
<!--        >-->
<!--          <el-table-column label="序号" type="index" width="50"></el-table-column>-->
<!--          <el-table-column label="收货人" width="250" align="center">-->
<!--            <template slot-scope="scope">-->
<!--              <p>{{scope.row.userName}}</p>-->
<!--            </template>-->
<!--          </el-table-column>-->
<!--          <el-table-column label="商品图片" width="400" align="center">-->
<!--            <template slot-scope="scope">-->
<!--              <img style="height: 80px" :src="scope.row.imageUrl" />-->
<!--            </template>-->
<!--          </el-table-column>-->
<!--          <el-table-column label="商品名称" width="400" align="center">-->
<!--            <template slot-scope="scope">-->
<!--              <p>{{scope.row.productName}}</p>-->
<!--            </template>-->
<!--          </el-table-column>-->
<!--          <el-table-column label="收货地址" align="center">-->
<!--            <template slot-scope="scope">-->
<!--              <p>{{scope.row.province}} {{scope.row.city}} {{scope.row.address}}</p>-->
<!--            </template>-->
<!--          </el-table-column>-->
<!--        </el-table>-->
<!--      </div>-->
<!--    </el-tab-pane>-->
<!--    <el-tab-pane label="已发货" name="second">-->
<!--      <div class="table-container">-->
<!--        <el-table-->
<!--          ref="productTable"-->
<!--          :data="sendList"-->
<!--          style="width: 100%"-->
<!--          v-loading="listLoading"-->
<!--          highlight-current-row-->
<!--          border-->
<!--        >-->
<!--          <el-table-column label="序号" type="index" width="50"></el-table-column>-->
<!--          <el-table-column label="收货人" width="250" align="center">-->
<!--            <template slot-scope="scope">-->
<!--              <p>{{scope.row.userName}}</p>-->
<!--            </template>-->
<!--          </el-table-column>-->
<!--          <el-table-column label="商品图片" width="400" align="center">-->
<!--            <template slot-scope="scope">-->
<!--              <img style="height: 80px" :src="scope.row.imageUrl" />-->
<!--            </template>-->
<!--          </el-table-column>-->
<!--          <el-table-column label="商品名称" width="400" align="center">-->
<!--            <template slot-scope="scope">-->
<!--              <p>{{scope.row.productName}}</p>-->
<!--            </template>-->
<!--          </el-table-column>-->
<!--          <el-table-column label="收货地址" align="center">-->
<!--            <template slot-scope="scope">-->
<!--              <p>{{scope.row.province}} {{scope.row.city}} {{scope.row.address}}</p>-->
<!--            </template>-->
<!--          </el-table-column>-->
<!--        </el-table>-->
<!--      </div>-->
<!--    </el-tab-pane>-->
<!--  </el-tabs>-->
  </el-card>
</template>
<script>
// import ProductDetail from './components/ProductDetail'
export default {
  name: 'updateProduct',
  data() {
    return {
      activeName: 'first',
      notSendList: [],
      sendList: []
    }
  },
  created() {
    this.getNotSendList()
    this.getSendList()
  },
  methods: {
    // 获取待发货商品列表
    async getNotSendList() {
      this.listLoading = true
      const { data: res } = await this.$http.post('pro/redeemRecordNotSend')
      if (res.code == 200) {
        this.listLoading = false
        this.notSendList = res.data
      } else {
        return this.$message.error('获取兑换商品列表失败!')
      }
    },
    // 获取已发货商品列表
    async getSendList() {
      this.listLoading = true
      const { data: res } = await this.$http.post('pro/redeemRecordAlreadySend')
      if (res.code == 200) {
        this.listLoading = false
        this.sendList = res.data
      } else {
        return this.$message.error('获取兑换商品列表失败!')
      }
    }
  }
  // components: { ProductDetail }
}
</script>
<style>
</style>
